﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyServer.Todo.Infrastructure.DatabaseContext.EntityConfigurations
{
    public class TodoGroupSettingsConfig : IEntityTypeConfiguration<TodoGroupSettings>
    {
        public void Configure(EntityTypeBuilder<TodoGroupSettings> builder)
        {


            builder.ToTable("todo_group_settings");

            builder.HasKey(_ => _.Id);
            builder.Property(_ => _.Id)
                .HasColumnName("id")
                .HasMaxLength(36)
                .IsRequired();

            builder.Property(_ => _.Theme).HasColumnName("theme");

            builder.Property(_ => _.IsHidden).HasColumnName("is_hidden");

        }
    }
}
